import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const originalPush = Router.prototype.push
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
Router.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}

export default new Router({
	routes: [{
		path: '/',
		component: () => import('@/views/index'),
		name: 'index',
		meta: {
			title: '河南省商丘市人民检察院'
		}
	}, {
		path: '/agencySet',
		component: () => import('@/views/agencySet'),
		name: 'agencySet',
		meta: {
			title: '机构设置'
		}
	}, {
		path: '/affairsOpen',
		component: () => import('@/views/affairsOpen'),
		name: 'affairsOpen',
		meta: {
			title: '检务公开'
		}
	}, {
		path: '/newsList',
		component: () => import('@/views/newsList'),
		name: 'newsList',
		meta: {
			title: '检察要闻'
		}
	}, {
		path: '/lawMonitor',
		component: () => import('@/views/lawMonitor'),
		name: 'lawMonitor',
		meta: {
			title: '法律监督'
		}
	}, {
		path: '/business',
		component: () => import('@/views/business'),
		name: 'business',
		meta: {
			title: '检察业务'
		}
	}, {
		path: '/theoryResearch',
		component: () => import('@/views/theoryResearch'),
		name: 'theoryResearch',
		meta: {
			title: '理论研究'
		}
	}, {
		path: '/baseBuilding',
		component: () => import('@/views/baseBuilding'),
		name: 'baseBuilding',
		meta: {
			title: '基层建设'
		}
	}, {
		path: '/commonDetail',
		component: () => import('@/views/commonDetail'),
		name: 'commonDetail',
		meta: {
			title: '详情'
		}
	}, {
		path: '/searchResult',
		component: () => import('@/views/searchResult'),
		name: 'searchResult',
		meta: {
			title: '搜索结果'
		}
	}, {
		path: '/searchDetail',
		component: () => import('@/views/searchDetail'),
		name: 'searchDetail',
		meta: {
			title: '详情'
		}
	}]
})